<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title ng-bind="ofTitle"></title>
    <!--弹出层插件-->
    <!--<link rel="stylesheet" href="/js/lib/layer_mobile/need/layer.css" type="text/css">-->
    <!--&lt;!&ndash;基本样式&ndash;&gt;-->
    <!--<link rel="stylesheet" href="/less/register.css" type="text/css">-->
    <!--<link rel="stylesheet" href="/less/product-list.css" type="text/css">-->
    <!--<link rel="stylesheet" href="/less/product-detail.css" type="text/css">-->
    <!--<link rel="stylesheet" href="/less/list-detail.css" type="text/css">-->
    <!--<link rel="stylesheet" href="/less/car-location.css" type="text/css">-->
    <!--<link rel="stylesheet" href="/less/my-finance.css" type="text/css">-->
    <!--<link rel="stylesheet" href="/less/my-earn.css" type="text/css">-->
    <!--<link rel="stylesheet" href="/less/earn-detail.css" type="text/css">-->
    <!--<link rel="stylesheet" href="/less/servicer.css" type="text/css">-->
    <!--<link rel="stylesheet" href="/less/project-introduct.css" type="text/css">-->
    <!--<link rel="stylesheet" href="/less/tips.css" type="text/css">-->
    <script type="text/javascript">
        (function (doc, win) {
            var docEl = doc.documentElement,
                resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
                recalc = function () {
                    var clientWidth = docEl.clientWidth;
                    if (!clientWidth) return;
                    docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
                };
            if (!doc.addEventListener) return;
            win.addEventListener(resizeEvt, recalc, false);
            doc.addEventListener('DOMContentLoaded', recalc, false);
        })(document, window);
        //        静默授权
        (function () {
            var prefix = "http://api.jshrdtz.com";
            var wprefix = "http://m.jshrdtz.com";
            var _url = prefix + "/api/weixin/openId";
            if (navigator.userAgent.toLowerCase().match(/MicroMessenger/gi) != null) {
                var XMLHttpReq = new XMLHttpRequest();
                XMLHttpReq.open("GET", _url, true);
                XMLHttpReq.withCredentials = true;
                XMLHttpReq.onreadystatechange = function () {
                    if (XMLHttpReq.readyState == 4) {
                        if (XMLHttpReq.status == 200) {
                            var _json = XMLHttpReq.response;
                            var openId = _json;
                            if (!openId) {
                                let _href = prefix + "/api/weixin/init?url=" + encodeURIComponent(location.href);
                                location.href = _href;

                            }
                        } else {
                            throw new Error("XMLHttpRequest response filed!!!!!");
                        }
                    }
                };
                XMLHttpReq.send(null);
            }
        })();
    </script>

</head>
<body>
<div ui-view=""></div>
</body>

</html>